<%@page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/tagDeclare.jsp"%>
<%@include file="/headDeclare.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">>  
<head>
	<title>福建青年墙体资源管理系统</title>

	<style type="text/css">
		html,body{
		    height: 100%;/*设置html和body的width和height为100%，可使全屏生效*/
		    width: 100%;
		    font-size: 16px;
		    font-family: 微软雅黑, 宋体, 黑体;
		    color: #535353;
		    margin: 0px; /*设置上下左右的相对位置为0，可避免超出范围出现滚动条*/
		}

		body {
		    white-space: nowrap;/*设置white-space:nowrap，同时在相对参照元素中线居中时设定display:inline-block，可避免浏览器缩放时，垂直居中的容器换行*/
		    text-align: center;/*设置text-align: center，可使子容器水平对齐*/
		}
		
		img {border:0px;}
		
		.divbg{
			background-image: url(images/login_bg1.jpg);
 			background-repeat: repeat; 	
			background-position: center ;
			height:100%;
			background-size:cover; 
			filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
		    src='images/login_bg1.jpg',
		    sizingMethod='scale');
  			width: 100%;   
			background-color: #FFF;
		}
		
		.tb{
			margin-top: 15%;
		}
		
		.inputuser{
			height: 25px;
			width: 120px;
			font-size: 13px;
			line-height: 18px;
			color: #000;
			text-indent: 5px;
			background-color: #FFF;
			margin-top:2px;
			
			border: 1px solid #a43034;
		}
		
		.inputuser2{
			height: 25px;
			width: 60px;
			font-size: 13px;
			line-height: 18px;
			color: #000;
			text-indent: 5px;
			margin-top:2px;
			background-color: #FFF;
			border: 1px solid #a43034;
		}
		img {border:0px;margin-left:5px;}
		.button{font-size: 12px; width: 60px; height: 33px; }
	</style>
	<script type="text/javascript">
        var href = location.href;
        var parentHref = parent.location.href;
        if(parentHref != href && href.indexOf("login.do") != -1) parent.location.href = "login.do";
	
		$(document).ready(function () {
			$.ajaxSetup ({ cache:false, async:false});
			
		 	$("#vericode-btn").click(function(){
		 		$('#vericode-img').attr('src', 'vericode.do?' + Math.random());
		 	});

            var options = {dataType: 'json', success : process};
		 	$("#loginForm").submit(function(){
                $(this).ajaxSubmit(options);
                return false;
		 	});

		 	$('#vericode-img').attr('src', 'vericode.do?' + Math.random());
		 	$("#p_error").hide();
		 	$("#username").focus();
		 	
		 	$("#visitor").click(function(){
		 		location.href = "index.do";
		 	});
		 });

		 function process(responseJson) {
            if(responseJson.code == 0) {
                $('#error_label').text("提示：" + responseJson.message);
                $("#p_error").show();
                $("#username").focus();
                $("#password").val(null);
                $("#vericode_text").val(null);
                $("#vericode-btn").click(); 
                return;
            }
            location.href = "index.do";
		 }
	</script>
</head>

<body>
	<div class="divbg">
		<form action="login.do" id="loginForm" method="post" >
		<table border="0" cellpadding="0" cellspacing="0" class="tb">
				<tr>
					<td><input type="text"  name="username" id="username" class="inputuser" tabindex="1" /></td>
					<td><img style="height: 30px; vertical-align:middle; width: 75px;"  src="images/login.jpg"   /></td>
				</tr>
				<tr>
					<td><input type="password" name="password" id="password" class="inputuser" tabindex="2" /></td>
					<td><img style="height: 30px; vertical-align:middle; width: 75px;"  src="images/login.jpg"   /></td>
				</tr>
				<tr>
					<td><input type="text" id="vericode_text"  class="inputuser2"  name="vericode" tabindex="3" />
						<img id="vericode-img" style="height: 30px; vertical-align:middle; width: 55px;"  src=""   /></td>
					<td><img style="height: 30px; vertical-align:middle; width: 75px;"  src="images/vericode.jpg"   /></td>
				</tr>
		</table>
		</form>
	</div>
	
</body>
</html>
    